# ###############################################
# Check for a valid version of CMake.
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.3 )


# ###############################################
INCLUDE( CMake/Setup.cmake )


# ###############################################
# Start the project.
PROJECT( CMakeProject )


# ###############################################
# Include some utilities.
INCLUDE( CMake/Compilers.cmake )
INCLUDE( CMake/Options.cmake )
INCLUDE( CMake/SetupMsvcIntel.cmake )
INCLUDE( CMake/SetupGnuClang.cmake )


# ###############################################
# Generate the configuration file based on the
# options provided.
CONFIGURE_FILE( ${CMAKE_CURRENT_LIST_DIR}/Config.hpp.in ${CMAKE_CURRENT_LIST_DIR}/Libraries/Core/Include/Core/Config.hpp )


# ###############################################
# Find the threading package for this machine.
FIND_PACKAGE( Threads )


# ###############################################
# Add the external libraries, internal libraries,
# applications and tools to the project.
INCLUDE( External/CMakeLists.txt )
INCLUDE( Libraries/CMakeLists.txt )
ADD_SUBDIRECTORY( Applications )
ADD_SUBDIRECTORY( Tools )

